import request from '@/utils/request'

export function getImageList(type) {
  return request({
    url: '/shopManage/images',
    method: 'get',
    params: type
  })
}

export function delImage(id) {
  return request({
    url: `/shopManage/images/${id}`,
    method: 'delete'
  })
}

export function getImage(id) {
  return request({
    url: `/shopManage/images/${id}`,
    method: 'get'
  })
}

export function addImage(data) {
  return request({
    url: `/shopManage/images`,
    method: 'post',
    data
  })
}

export function updateImage(id, data) {
  return request({
    url: `/shopManage/images/${id}`,
    method: 'put',
    data
  })
}

export function getOpenScreenAdSetting() {
  return request({
    url: '/shopManage/getOpenScreenAdSetting',
    method: 'get'
  })
}

export function saveOpenScreenAdSetting(data) {
  return request({
    url: '/shopManage/saveOpenScreenAdSetting',
    method: 'post',
    data
  })
}

export function getUpgrateVipSetting() {
  return request({
    url: '/shopManage/getUpgrateVipSetting',
    method: 'get'
  })
}

export function saveUpgrateVipSetting(data) {
  return request({
    url: '/shopManage/saveUpgrateVipSetting',
    method: 'post',
    data
  })
}

export function getPromoteSetting() {
  return request({
    url: '/shopManage/getPromoteSetting',
    method: 'get'
  })
}

export function savePromoteSetting(data) {
  return request({
    url: '/shopManage/savePromoteSetting',
    method: 'post',
    data
  })
}

export function getNavSetting() {
  return request({
    url: '/shopManage/getNavSetting',
    method: 'get'
  })
}

export function saveNavSetting(data) {
  return request({
    url: '/shopManage/saveNavSetting',
    method: 'post',
    data
  })
}

export function getPreviewQrcodeSetting() {
  return request({
    url: '/shopManage/getPreviewQrcodeSetting',
    method: 'get'
  })
}

export function savePreviewQrcodeSetting(data) {
  return request({
    url: '/shopManage/savePreviewQrcodeSetting',
    method: 'post',
    data
  })
}

export function getWxMenuSetting() {
  return request({
    url: '/shopManage/getWxMenuSetting',
    method: 'get'
  })
}

export function saveWxMenuSetting(data) {
  return request({
    url: '/shopManage/saveWxMenuSetting',
    method: 'post',
    params: {
      menus: data
    }
  })
}

export function toFeedback(data) {
  return request({
    url: '/shopManage/toFeedback',
    method: 'post',
    data
  })
}

export function toGetFeedbackInfo(query) {
  return request({
    url: '/shopManage/toGetFeedbackInfo',
    method: 'post',
    params: query
  })
}

export function toGetFeedbackDetail(id) {
  return request({
    url: '/shopManage/getFeedbackDetail/' + id,
    method: 'get'
  })
}
export function getTitleSetting() {
  return request({
    url: '/shopManage/getTitleSetting',
    method: 'get'
  })
}

export function saveTitleSetting(data) {
  return request({
    url: '/shopManage/saveTitleSetting',
    method: 'post',
    data
  })
}

export function getFooterNavs(){
  return request({
    url: '/shopManage/getFooterNavs',
    method: 'get'
  })
}
//保存底部导航
export function saveFooterNavs(data){
  return request({
    url: '/shopManage/saveFooterNavs',
    method: 'post',
    data
  })
}
